package com.tobdev.qywxinner.model.dto;

import lombok.Data;

import java.util.List;

@Data
public class WxUserDetailResponseDto {
    private int errcode;
    private String errmsg;
    private String userid;
    private String name;
    private List<Integer> department;
    private List<Integer> order;
    private String position;
    private String mobile;
    private String gender;
    private String email;
    private String biz_mail;
    private List<Integer> is_leader_in_dept;
    private List<String> direct_leader;
    private String avatar;
    private String thumb_avatar;
    private String telephone;
    private String alias;
    private String address;
    private String open_userid;
    private int main_department;
    private ExtAttr extattr;
    private int status;
    private String qr_code;
    private String external_position;
    private ExternalProfile external_profile;

    @Data
    public static class ExtAttr {
        private List<Attr> attrs;

        @Data
        public static class Attr {
            private int type;
            private String name;
            private Text text;
            private Web web;

            @Data
            public static class Text {
                private String value;
            }

            @Data
            public static class Web {
                private String url;
                private String title;
            }
        }
    }

    @Data
    public static class ExternalProfile {
        private String external_corp_name;
        private WechatChannels wechat_channels;
        private List<ExternalAttr> external_attr;

        @Data
        public static class WechatChannels {
            private String nickname;
            private int status;
        }

        @Data
        public static class ExternalAttr {
            private int type;
            private String name;
            private Text text;
            private Web web;
            private MiniProgram miniprogram;

            @Data
            public static class Text {
                private String value;
            }

            @Data
            public static class Web {
                private String url;
                private String title;
            }

            @Data
            public static class MiniProgram {
                private String appid;
                private String pagepath;
                private String title;
            }
        }
    }
}
